home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000144_news@watsun.cc.columbia.edu _Fri Jan 22 14:46:43 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA06931
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 22 Jan 1999 14:46:43 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id OAA25249
  7.     for kermit.misc@watsun.cc.columbia.edu; Fri, 22 Jan 1999 14:19:41 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: sleeping for random amounts of time
  11. Date: 22 Jan 1999 19:19:40 GMT
  12. Organization: Columbia University
  13. Message-ID: <78aj0c$oku$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@mailrelay2.cc.columbia.edu
  15.  
  16. In article <gerlachF5z4BA.Hwu@netcom.com>,
  17. Matthew H. Gerlach <gerlach@netcom.com> wrote:
  18. : I want to write a kermit script to thrash a device I'm working on.
  19. : In doing so, I want the script to be able to insert random pauses
  20. : in the data stream.  
  21. : I figured the msleep command would provide the pauses, but I see no
  22. : builting random() function call or anything like that.  I didn't see
  23. : a relevent posting in a DejaNews search; so I was wondering if anyone
  24. : had a good idea for generating a random number in a kermit script?
  25. It depends on the Kermit program and version.  Kermit 95 1.1.17 (the
  26. current version) has a function that returns a random integer within
  27. the given range.
  28.  
  29. C-Kermit 7.0, to be announced for testing soon, has this too.
  30.  
  31. Otherwise you can use something like \fright(\v(ntime),2) (the rightmost
  32. 2 digits of the number of seconds since midnight).
  33.  
  34. - Frank